Proving geometric means theorem